import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'LayoutView',
      component: ()=>import ('@/views/layout/LayoutView.vue'),
      redirect:'/home',
      children:[
        {
          path:'/home',
          name:'HomeView',
          component:()=>import ('@/views/home/HomeView.vue')
        },{
          path:'/cart',
          name:'CartView',
          component:()=>import ('@/views/cart/CartView.vue')
        },{
          path:'/my',
          name:'MyView',
          component:()=>import('@/views/my/MyView.vue')
        },{
          path:'/order',
          name:'OrderView',
          component:()=>import ('@/views/order/OrderView.vue')
        }
      ]
    },
    {
      path:'/address',
      name:'AddressView',
      component:()=>import ('@/views/my/AddressView.vue')
    },{
      path:'/createaddress',
      name:'CreateAddressView',
      component:()=>import ('@/views/my/CreateAddressView.vue')
    },
    {
      path: '/shop',
      name: 'ShopView',
      component: () => import('../views/shop/ShopView.vue'),
    },
    {
      path: '/orderconfirmation',
      name: 'OrderConfirmationView',
      component: () => import('../views/orderConfirmation/OrderConfirmationView.vue'),
    },
  
  ]
})

export default router
